/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author admin-pc
 */
public class Application {

    Command[] selects;

    public Application() {
        selects = new Command[8];

        Command noCommand = new NoCommand();
        for (int i = 0; i < 8; i++) {
            selects[i] = noCommand;
        }
    }

    public void setCommand(int slot, Command select) {
        selects[slot] = select;
    }

    public void buttonWasPressed(int slot) {
        selects[slot].execute();
    }

}
